<?php
/**
 * A simple description for this script
 *
 * PHP Version 5.2.0 or Upper version
 *
 * @package    Iris
 * @author     Hidehito NOZAWA aka Suin <http://suin.asia>
 * @copyright  2010 Hidehito NOZAWA
 * @license    http://www.gnu.org/licenses/gpl-2.0.html GNU GPL v2
 *
 */

function iris_block_show($options)
{
	if ( !class_exists('Iris', false) )
	{
		require dirname(dirname(__FILE__)).'/iris.php';
	}

	Iris::setup();

	ob_start();
	Iris::block($options[0], $options);
	$content = ob_get_contents();
	ob_end_clean();

	if ( $content === false ) return false;

	return array('content' => $content);
}

function iris_block_edit($options)
{
	if ( !class_exists('Iris', false) )
	{
		require dirname(dirname(__FILE__)).'/iris.php';
	}

	Iris::setup();

	ob_start();
	Iris::block($options[0], $options, true);
	$content = ob_get_contents();
	ob_end_clean();

	if ( $content === false ) return false;

	return $content;
}

?>
